package com.yby6.web.controller.tool;

import com.yby6.common.core.AjaxResult;
import com.yby6.common.satoken.LoginHelper;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: yangbuyi-rbac
 * @ClassName: DemoController
 * @create: 2023/1/12:13:58
 * @author: Yang Shuai
 * @desc: |
 **/
@RestController
@RequestMapping("demo")
@RequiredArgsConstructor
public class DemoController {

    @GetMapping
    public AjaxResult getUserId() {

        Long userId = LoginHelper.getUserId();

        return AjaxResult.success(userId);

    }

}
